<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::group(['prefix'=>'blog_admin','middleware'=>'admin_auth'],function(){
	//博客管理
	//友情链接
	Route::get('/link/index','BlogLinkController@index')->name('blog_admin.link.index'); 
	Route::get('/link/data', 'BlogLinkController@data')->name('blog_admin.link.data');
	//添加
	Route::get('/link/create','BlogLinkController@create')->name('blog_admin.link.create'); 
	Route::post('/link/store','BlogLinkController@store')->name('blog_admin.link.store');
	
	//编辑
	Route::get('/link/{id}/edit','BlogLinkController@edit')->name('blog_admin.link.edit');
	Route::put('/link/{id}/update','BlogLinkController@update')->name('blog_admin.link.update');
	//状态
	Route::put('/link/{id}/status','BlogLinkController@status')->name('blog_admin.link.status');
	//排序
	Route::put('/link/{id}/sorts','BlogLinkController@sorts')->name('blog_admin.link.sorts'); 	
	
	//单个删除
	Route::delete('/link/destroy','BlogLinkController@destroy')->name('blog_admin.link.destroy');
	
	//批量删除
	Route::delete('/link/destroy_all','BlogLinkController@destroy_all')->name('blog_admin.link.destroy_all');
	
	
	//栏目管理
	Route::get('/column/index','BlogColumnController@index')->name('blog_admin.column.index'); 
	Route::post('/column/data', 'BlogColumnController@data')->name('blog_admin.column.data');
	//添加
	Route::get('/column/create','BlogColumnController@create')->name('blog_admin.column.create');
	Route::post('/column/store','BlogColumnController@store')->name('blog_admin.column.store');
	//添加子级
	Route::get('/column/{id}/create_sublevel','BlogColumnController@create_sublevel')->name('blog_admin.column.create_sublevel'); 
	Route::post('/column/store_sublevel','BlogColumnController@store_sublevel')->name('blog_admin.column.store_sublevel');
	//编辑
	Route::get('/column/{id}/edit','BlogColumnController@edit')->name('blog_admin.column.edit');
	Route::put('/column/{id}/update','BlogColumnController@update')->name('blog_admin.column.update');
	//状态
	Route::put('/column/{id}/status','BlogColumnController@status')->name('blog_admin.column.status');
	//排序
	Route::put('/column/{id}/sorts','BlogColumnController@sorts')->name('blog_admin.column.sorts'); 	
	//单个删除
	Route::delete('/column/destroy','BlogColumnController@destroy')->name('blog_admin.column.destroy');
	
	
	
	//标签管理 
	Route::get('/label/index','BlogLabelController@index')->name('blog_admin.label.index'); 
	Route::get('/label/data', 'BlogLabelController@data')->name('blog_admin.label.data');
	//添加
	Route::get('/label/create','BlogLabelController@create')->name('blog_admin.label.create'); 
	Route::post('/label/store','BlogLabelController@store')->name('blog_admin.label.store');
	
	//编辑
	Route::get('/label/{id}/edit','BlogLabelController@edit')->name('blog_admin.label.edit');
	Route::put('/label/{id}/update','BlogLabelController@update')->name('blog_admin.label.update');
	//状态
	Route::put('/label/{id}/status','BlogLabelController@status')->name('blog_admin.label.status');
	//排序
	Route::put('/label/{id}/sorts','BlogLabelController@sorts')->name('blog_admin.label.sorts'); 	
	
	//单个删除
	Route::delete('/label/destroy','BlogLabelController@destroy')->name('blog_admin.label.destroy');
	
	//批量删除
	Route::delete('/label/destroy_all','BlogLabelController@destroy_all')->name('blog_admin.label.destroy_all');
	
	
	
	//文章管理
	Route::get('/article/index','BlogArticleController@index')->name('blog_admin.article.index'); 
	Route::get('/article/data', 'BlogArticleController@data')->name('blog_admin.article.data');
	//添加
	Route::get('/article/create','BlogArticleController@create')->name('blog_admin.article.create');
	Route::post('/article/store','BlogArticleController@store')->name('blog_admin.article.store');
	
	//编辑
	Route::get('/article/{id}/edit','BlogArticleController@edit')->name('blog_admin.article.edit');
	Route::put('/article/{id}/update','BlogArticleController@update')->name('blog_admin.article.update');
	//状态
	Route::put('/article/{id}/status','BlogArticleController@status')->name('blog_admin.article.status');
	//是否推荐
	Route::put('/article/{id}/open','BlogArticleController@open')->name('blog_admin.article.open');
	//排序
	Route::put('/article/{id}/sorts','BlogArticleController@sorts')->name('blog_admin.article.sorts'); 	
	
	//单个删除
	Route::delete('/article/destroy','BlogArticleController@destroy')->name('blog_admin.article.destroy');
	
	//批量删除
	Route::delete('/article/destroy_all','BlogArticleController@destroy_all')->name('blog_admin.article.destroy_all');
	
	//文章推送
	Route::get('/article/push_url','BlogArticleController@push_url')->name('blog_admin.article.push_url');
	
	//博客配置
	Route::get('/config/index','BlogConfigController@index')->name('blog_admin.config.index'); 
	//博客配置数据处理
	Route::put('/config/{id}/update','BlogConfigController@update')->name('blog_admin.config.update');
	
	
	//评论管理
	Route::get('/comment/index','BlogCommentController@index')->name('blog_admin.comment.index'); 
	Route::get('/comment/data', 'BlogCommentController@data')->name('blog_admin.comment.data');
	
	//单个删除
	Route::delete('/comment/destroy','BlogCommentController@destroy')->name('blog_admin.comment.destroy');
	
	//批量删除
	Route::delete('/comment/destroy_all','BlogCommentController@destroy_all')->name('blog_admin.comment.destroy_all');
});















